package cn.tb.ymcc.feign;

import cn.tb.ymcc.doc.CourseDoc;
import cn.tb.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = CourseSearchFeignClientFallBackFactory.class)
public interface CourseSearchFeignClient {

    @PostMapping("/saveCourse")
    JSONResult saveCourse(@RequestBody CourseDoc doc);

    @PostMapping("/deleteCourse/{courseId}")
    JSONResult deleteCourse(@PathVariable("courseId") Long courseId);
}
